<?php
	require_once '../lib/sql.utils.php';
	
	$categoryId = $_POST['categoryId'];
	$sql_util = new SqlUtils();
	$result = $sql_util -> getRows('SELECT * FROM categories WHERE categoryId = '.$categoryId);
?>
<div class="menu">
		Quản lý danh mục > Thêm danh mục
</div>
<form id="myForm" name="myForm" method="post" enctype="multipart/form-data" action="service/process_edit_category.php">
	<input type="hidden" name="id" value="<?php echo $result[0]['categoryId']; ?>" />
	<label for="name">Tên danh mục :</label>
	<input type="text" id="name" name="name" value="<?php echo $result[0]['categoryName']; ?>" />
	<span id="check-name"></span>
	<br />
	<label for="description">Ghi chú :</label>	
	<textarea id="description" name="description" rows="10" cols="70" value="<?php echo $result[0]['categoryDescription']; ?>" >
	<?php echo $result[0]['categoryDescription']; ?>
	</textarea>
	<br />
	<input type="submit" id="button" name="button" value="Submit"/>
</form>